import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/material.dart';
import 'package:znmm/UI/A_Common/image/cached_network_Image.dart';

class NatuweArTryonView extends StatelessWidget {
  const NatuweArTryonView({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      height: 320,
      color: const Color(0xFFF7F8FC), // 背景色
      padding: const EdgeInsets.all(10.0),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          // 上方文字部分
          const Text(
            "NATUWE&CO AR TRY-ON",
            style: TextStyle(
              fontSize: 20.0,
              fontWeight: FontWeight.bold,
            ),
          ),
          const SizedBox(height: 10.0),
          const AutoSizeText(
            "NATUWE&CO gives you an innovative way to shop for glasses with the AR Try-On function that enables realistic frame visualization. It makes finding frames you’ll love as easy as clicking the button. Using AR Try-On to let you virtually try on a pair of glasses anytime, anywhere.",
            style: TextStyle(
              fontSize: 14.0,
              color: Colors.black54,
              //height: 1.5,
            ),
            maxLines: 4,
            minFontSize: 12.0, // 设置最小字体大小
            overflow: TextOverflow.ellipsis, // 超出时显示省略号
          ),
          // const SizedBox(height: 24.0),
          // Center(
          //   child: ElevatedButton(
          //     onPressed: () {
          //       // 添加按钮点击事件
          //     },
          //     style: ElevatedButton.styleFrom(
          //       primary: Colors.black, // 按钮颜色
          //       padding: const EdgeInsets.symmetric(
          //         horizontal: 24.0,
          //         vertical: 12.0,
          //       ),
          //     ),
          //     child: const Text(
          //       "TRY-ON FAST",
          //       style: TextStyle(
          //         color: Colors.white,
          //         fontSize: 16.0,
          //       ),
          //     ),
          //   ),
          // ),
          const SizedBox(height: 16.0),

          // 下方图片部分
          Expanded(
              child: SizedBox(
            // height: 160,
            width: double.infinity,
            child: ClipRRect(
              borderRadius: BorderRadius.circular(8.0),
              child: const CachedNetworkImageLoader(
                imageUrl: "https://www.glassesin.com/image/home/video.webp",
              ),
            ),
          )),
        ],
      ),
    );
  }
}
